my $nauticalMiles;
my $feet;
my $glideRatio;
my $altitude;

print "What is the distance you need to be able to glide (in NM)? ";
chomp($nauticalMiles = <>);
print "What is the glide ratio of your aircraft? ";
chomp($glideRatio = <>);

$feet = $nauticalMiles * 6076.12;
$altitude = $feet / $glideRatio;

printf "You will need to be at least %.1f feet AGL glide $nauticalMiles NM\n", $altitude;